//
//  AboutController.m
//  iNeedish
//

#import "AboutController.h"
#import "INDefaultStylesheet.h"


@implementation AboutController

-(id)init
{
	self = [super init];
	self.tableViewStyle = UITableViewStyleGrouped;
	
	self.title = NSLocalizedString(@"About", nil);
	
	self.statusBarStyle = UIStatusBarStyleBlackOpaque;
	self.navigationBarTintColor = TTSTYLEVAR(needishBlueColor);
	self.variableHeightRows = YES;
	self.tableView.separatorStyle = UITableViewCellSeparatorStyleSingleLine;	
	self.hidesBottomBarWhenPushed = YES;	
	
	UIImage* image = [UIImage imageNamed:@"About.png"];
	//self.tabBarItem = [[[UITabBarItem alloc] initWithTabBarSystemItem:UITabBarSystemItemMostViewed tag:1] autorelease];
	self.tabBarItem = [[UITabBarItem alloc] initWithTitle:self.title image:image tag:1];
	
	
	return self;
}

-(void)createModel
{
	self.dataSource = [TTSectionedDataSource dataSourceWithObjects:
					   NSLocalizedString(@"Needish client for iPhone",nil),
					   [TTTableTextItem itemWithText:[NSString stringWithFormat:@"Version: %@", 
													  [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleVersion"]]],
					   NSLocalizedString(@"Developed by:", nil),
					   [TTTableTextItem itemWithText:@"Felipe Navarro V." URL:@"in://userView/?user=4106"],
					   
					   NSLocalizedString(@"BETA testers:", nil),
					   [TTTableTextItem itemWithText:@"Daniel López" URL:@"in://userView/?user=5829"],					   
					   [TTTableTextItem itemWithText:@"Daniel Undurraga" URL:@"in://userView/?user=83"],
					   [TTTableTextItem itemWithText:@"Pablo Viojo" URL:@"in://userView/?user=95"],
					   nil];
}


-(void)viewDidDisappear:(BOOL)animated {
	self.hidesBottomBarWhenPushed = NO;
}


@end
